***Replication Abou-Chadi/Hix. 2021. British Journal of Sociology***

use "bjs_replication_ah.dta", clear


*Figure 1. Table A2*
logit left_right i.eisced agea gndr domicil income i.cy [pweight=pspwght], cl(cyear)  
margins, at(eisced=(1(1)7))  
marginsplot, scheme(plotplain) horizontal recast(scatter) title("") xtitle("Predicted probability left vs right vote") ytitle("") ///
plot1opts(color(red)) ci1opts(lcolor(red))

eststo: logit left_right i.eisced agea gndr domicil income i.cy [pweight=pspwght], cl(cyear)  
esttab using "bjs_tableA1.tex", b(3) se star(* 0.05 ** 0.01) replace label nodep 
eststo clear 

mlogit left_right_nonvote i.eisced agea gndr domicil income i.cy [pweight=pspwght], cl(cyear)  
margins, at(eisced=(1(1)7))  predict(outcome(0)) predict(outcome(1)) predict(outcome(2))
marginsplot, scheme(plotplain) ///
horizontal recast(scatter) title("") ytitle("") xtitle("Predicted probability party vote") plot1opts(color(black)) ci1opts(lcolor(black)) ///
 plot2opts(color(red)) ci2opts(lcolor(red))   ///
 plot3opts(color(g12)) ci3opts(lcolor(gs12)) 

 
**Figure 2. Table A3**


mlogit party4 i.eisced agea gndr domicil income i.cy [pweight=pspwght], cl(cyear)  
margins, at(eisced=(1(1)7)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) predict(outcome(4)) 
marginsplot, scheme(plotplain) ///
horizontal recast(scatter) title("") ytitle("") xtitle("Predicted probability party vote") plot1opts(color(red)) ci1opts(lcolor(red)) ///
 plot2opts(color(black)) ci2opts(lcolor(black))   ///
 plot3opts(color(brown)) ci3opts(lcolor(brown)) ///
 plot4opts(color(green)) ci4opts(lcolor(green)) ///
 legend(pos(6) col(4) label(1 "Mainstream Left" 2 "Mainsream Right" 3 "Radical Right" 4 "Green"))


eststo: mlogit party4 i.eisced agea gndr domicil income i.cy [pweight=pspwght], cl(cyear)   
esttab using "bjs_tableA2.tex", b(3) se star(* 0.05 ** 0.01) replace label nodep unst 
eststo clear 

*France
mlogit party4 i.eisced agea gndr domicil income if cntry=="FR" [pweight=pspwght], robust  
margins, at(eisced=(1(1)7)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) predict(outcome(4)) 
marginsplot, scheme(plotplain) ///
horizontal recast(scatter) title("France") ytitle("") xtitle("Predicted probability party vote") plot1opts(color(red)) ci1opts(lcolor(red)) ///
 plot2opts(color(black)) ci2opts(lcolor(black))   ///
 plot3opts(color(brown)) ci3opts(lcolor(brown)) ///
 plot4opts(color(green)) ci4opts(lcolor(green)) 

*UK
mlogit party4 i.eisced agea gndr domicil income if cntry=="GB" [pweight=pspwght], robust  
margins, at(eisced=(1(1)7)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) predict(outcome(4)) 
marginsplot, horizontal recast(scatter) title("Britain") xtitle("Predicted probability party vote") plot1opts(color(red)) ci1opts(lcolor(red)) ///
 plot2opts(color(black)) ci2opts(lcolor(black))   ///
 plot3opts(color(brown)) ci3opts(lcolor(brown)) ///
 plot4opts(color(green)) ci4opts(lcolor(green)) 

*DE
mlogit party4 i.eisced agea gndr domicil income if cntry=="DE" [pweight=pspwght], robust  
margins, at(eisced=(1(1)7)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) predict(outcome(4)) 
marginsplot, horizontal recast(scatter) title("Germany") xtitle("Predicted probability party vote") plot1opts(color(red)) ci1opts(lcolor(red)) ///
 plot2opts(color(black)) ci2opts(lcolor(black))   ///
 plot3opts(color(brown)) ci3opts(lcolor(brown)) ///
 plot4opts(color(green)) ci4opts(lcolor(green)) 
 
*NL
mlogit party4 i.eisced agea gndr domicil income if cntry=="NL" [pweight=pspwght], robust  
margins, at(eisced=(1(1)7)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) predict(outcome(4)) 
marginsplot, horizontal recast(scatter) title("Netherlands") xtitle("Predicted probability party vote") plot1opts(color(red)) ci1opts(lcolor(red)) ///
 plot2opts(color(black)) ci2opts(lcolor(black))   ///
 plot3opts(color(brown)) ci3opts(lcolor(brown)) ///
 plot4opts(color(green)) ci4opts(lcolor(green)) 

 

**Figure 3. Table A4. Figure4**
mlogit party4 eisced i.class8 pubsector agea gndr domicil income i.cy [pweight=pspwght], cl(cyear) base(1) 
margins, at(class8=(1(1)8)) predict(outcome(1)) predict(outcome(2)) predict(outcome(3)) predict(outcome(4)) 
marginsplot, scheme(plotplain) ///
horizontal recast(scatter) title("") ytitle("") xtitle("Predicted probability party vote") plot1opts(color(red)) ci1opts(lcolor(red)) ///
 plot2opts(color(black)) ci2opts(lcolor(black))   ///
 plot3opts(color(brown)) ci3opts(lcolor(brown)) ///
 plot4opts(color(green)) ci4opts(lcolor(green)) ///
 legend(pos(6) col(4) label(1 "Mainstream Left" 2 "Mainsream Right" 3 "Radical Right" 4 "Green"))


eststo: mlogit party4 eisced i.class8 pubsector agea gndr domicil income i.cy [pweight=pspwght], cl(cyear) base(2)   
esttab using "bjs_tableA3.tex", b(3) se star(* 0.05 ** 0.01) replace label nodep unst 
eststo clear 


logit left_right eisced i.class8 pubsector agea gndr domicil income i.cy [pweight=pspwght], cl(cyear) 
margins, at(class8=(1(1)8) pubsector=(0 1))  
marginsplot, scheme(plotplain) ///
horizontal recast(scatter) title("") ytitle("") xtitle("Predicted probability ML party vote") ///
plot1opts(color(blue)) ci1opts(lcolor(blue)) plot2opts(color(green)) ci2opts(lcolor(green)) ///
 legend(pos(6) col(2) label(1 "Private" 2 "Public"))

**Figure 5. Figure 6. Table A5**
gen accept_diff=dfincac
recode accept_diff 2=1 3 4 5=0
tab accept_diff

lab def accept_diff 0 "Disagree" 1 "Agree"
lab val accept_diff accept_diff

egen std_accept_diff=std(dfincac)

catplot accept_diff eisced, percent(left_right) scheme(plotplain) ///
over(left_right) stack asyvars  title("Large differences in income acceptable...") ///
bar(1, color(red)) bar(2, color(gs14))


logit left_right i.accept_diff##i.eisced agea gndr domicil income i.cy [pweight=pspwght], cl(cyear)
margins, dydx(accept_diff) at(eisced=(1(1)7))
marginsplot, scheme(plotplain) horizontal recast(scatter) title("") xtitle("AME 'Accept large differences...' on left vs right vote") ytitle("") ///
plot1opts(color(red)) ci1opts(lcolor(red))

eststo: logit left_right i.accept_diff##i.eisced agea gndr domicil income i.cy [pweight=pspwght], cl(cyear)  
esttab using "bjs_tableA4.tex", b(3) se star(* 0.05 ** 0.01) replace label nodep  
eststo clear 

**Redistributive preferences Gincdif
gen redib=gincdif
recode redib 2=1 3 4 5=0
tab redib

lab def redib 0 "Disagree" 1 "Agree"
lab val redib redib


catplot redib eisced, percent(left_right) scheme(plotplain) ///
over(left_right) stack asyvars  title("Governments should reduce differences in income") ///
bar(1, color(gs14)) bar(2, color(red))


logit left_right i.redib##i.eisced agea gndr domicil income i.cy [pweight=pspwght], cl(cyear)
margins, dydx(redib) at(eisced=(1(1)7))
marginsplot, scheme(plotplain) horizontal recast(scatter)  xtitle("AME 'Governments should reduce differences...' on left vs right vote") title("") ytitle("") ///
plot1opts(color(red)) ci1opts(lcolor(red))



